/*
 * @Author: Superficial
 * @Date: 2021-10-20 14:20:53
 * @LastEditTime: 2021-10-20 14:24:10
 * @Description: 缓存常量
 */

export const CACHE_PREFIX = '__nodepress_cache_'
export const OPTION = CACHE_PREFIX + 'option'
export const ALL_TAGS = CACHE_PREFIX + 'all-tags'
export const HOTTEST_ARTICLES = CACHE_PREFIX + 'hottest_articles'
export const ARCHIVE = CACHE_PREFIX + 'archive'
export const TODAY_VIEWS = CACHE_PREFIX + 'today-views'

export enum CacheKeys {
  Option = 'option',
  Archive = 'archive',
  AllTags = 'all-tags',
  TodayViewCount = 'today-view-count'
}

export const getDecoratorCacheKey = (key: string) => {
  return `decorator:${key}`
}

export const getDisqusCacheKey = (key: string) => {
  return `disqus:${key}`
}
